package kr.hkit.powerjava.chapter26.dto;

public class Employee implements Comparable<Employee> {
	private int empNo;
	private String empName;
	private String title;
	private int manager;
	private int salary;
	private int dno;
	
	public Employee() {}
	public Employee(int empNo) { this.empNo = empNo; }	
	public Employee(int empNo, String empName) {	//학번, 이름으로 검색
		this.empNo = empNo;
		this.empName = empName;
	}

	public Employee(int empNo, String empName, String title, int manager,
			int salary, int dno) {
		this.empNo = empNo;
		this.empName = empName;
		this.title = title;
		this.manager = manager;
		this.salary = salary;
		this.dno = dno;
	}

	public int getEmpNo() { return empNo; }
	public String getEmpName() { return empName; }
	public String getTitle() { return title; }
	public int getManager() { return manager; }
	public int getSalary() { return salary; }
	public int getDno() { return dno; }
	public void setEmpNo(int empNo) { this.empNo = empNo; }
	public void setEmpName(String empName) { this.empName = empName; }
	public void setTitle(String title) { this.title = title;}
	public void setManager(int manager) { this.manager = manager; }
	public void setSalary(int salary) { this.salary = salary; }
	public void setDno(int dno) { this.dno = dno; }

	@Override
	public String toString() {
		return String.format("%5s\t%5s\t%5s\t%5s\t%10s\t%3s",
				empNo, empName, title, manager, salary, dno);
	}
	@Override
	public int compareTo(Employee o) {
		return empNo - o.empNo;
	}
}